<template>
  <div class="header">
    <div class="nav-top">
      <div class="login-nav">
        <router-link to="/login">登录</router-link> |
        <router-link to="/login">注册</router-link>
      </div>
    </div>
    <nav>
      <div class="logo">
        <img src="../assets/images/logo.png" alt="">
      </div>
      <div class="nav-ver">
        <ul>
          <li><router-link to="/home">首页</router-link></li>
          <li><router-link to="/news">新闻公告</router-link></li>
          <li>
            <router-link to="/travel">游转阳泉</router-link>
            <ul class="drop">
              <li><router-link to="/travel/scenic">景点介绍</router-link></li>
              <li><router-link to="/travel/route">精选路线</router-link></li>
              <li><router-link to="/travel/story">红色故事</router-link></li>
            </ul>
          </li>
          <li><router-link to="/active">活动演出</router-link></li>
          <li><router-link to="/message">游记分享</router-link></li>
        </ul>
        <div class="drop-menu">
          <label class="iconfont icon-caidan--kuai" for="menu"></label>
          <input type="checkbox" id="menu">
          <ul>
            <li><router-link to="/home">首页</router-link></li>
            <li><router-link to="/news">新闻公告</router-link></li>
            <li>
              <label for="menuInner">玩转阳泉</label>
              <input type="checkbox" id="menuInner">
              <ul class="drop">
                <li><router-link to="/travel/scenic">景点介绍</router-link></li>
                <li><router-link to="/travel/route">精选路线</router-link></li>
                <li><router-link to="/travel/story">红色故事</router-link></li>
              </ul>
            </li>
            <li><router-link to="/active">活动演出</router-link></li>
            <li><router-link to="/message">游记分享</router-link></li>
            <li><router-link to="/login">登录</router-link></li>
          </ul>
        </div>
      </div>
    </nav>

  </div>
</template>

<script>
export default {
  mounted() {}
}
</script>

<style  scoped>
.nav-top {
  line-height: 40px;
  text-align: right;
  border-bottom: 1px solid #e6e6e6;
}
.nav-top .login-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.nav-top .login-nav > a {
  display: inline-block;
  padding: 0 10px;
  font-size: 15px;
  color: #666;
}
.nav-top .login-nav > a:hover {
  text-decoration: underline;
}
nav {
  max-width: 1200px;
  height: 74px;
  margin: 0 auto;
  background: #fff;
  padding: 0 15px;
}
nav .logo {
  display: flex;
  align-items: center;
  float: left;
  height: 100%;
}
nav .logo img {
  height: 95%;
}
nav .nav-ver {
  float: right;
}
nav .nav-ver > ul {
  line-height: 70px;
  text-align: center;
}
nav .nav-ver > ul li {
  float: left;
  position: relative;
}
nav .nav-ver > ul li a {
  display: inline-block;
  position: relative;
  font-size: 17px;
  padding: 0 30px;
}
nav .nav-ver > ul li a:hover {
  color: #ce3737;
}
nav .nav-ver > ul li a::after {
  content: '';
  width: 0;
  height: 3px;
  background-color: #ce3737;
  position: absolute;
  top: 100%;
  left: 5%;
  transition: all 0.6s;
}
nav .nav-ver > ul li a:hover:after {
  width: 90%;
}
nav .nav-ver > ul li .drop {
  position: absolute;
  margin-top: 3px;
  background: #fff;
  display: none;
  animation-name: dropmenu;
  animation-duration: 0.5s;
}
nav .nav-ver > ul li .drop li {
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  box-shadow: 0px 0px 2px #d4d4d4;
}
nav .nav-ver > ul li:hover .drop {
  display: block;
}

@keyframes dropmenu {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav .nav-ver .drop-menu {
  display: none;
  position: absolute;
  z-index: 99;
  width: 100%;
}
nav .nav-ver .drop-menu > label {
  display: flex;
  align-items: center;
  float: right;
  height: 50px;
  padding-right: 5%;
  text-align: center;
  font-size: 13rem;
}

nav .nav-ver .drop-menu input {
  display: none;
}
nav .nav-ver .drop-menu > ul {
  display: none;
  width: 65%;
  margin-left: 35%;
  margin-top: 50px;
  background-color: #fff;
  overflow: hidden;
}
nav .nav-ver .drop-menu > ul li {
  line-height: 10vw;
  text-align: center;
  border-bottom: 1px solid rgba(88, 88, 88, 0.1);
  box-shadow: 0px 0px 1px #d4d4d4;
}
nav .nav-ver .drop-menu > ul li a {
  display: block;
  width: 100%;
}
nav .nav-ver .drop-menu > ul li .drop {
  display: none;
  background: #f8f8f8;
}
nav .nav-ver .drop-menu > ul li .drop li {
  line-height: 7vw;
  box-shadow: 0px 0px 2px #fff;
}
nav .nav-ver .drop-menu > ul li .drop li a {
  color: #666;
}
nav .nav-ver .drop-menu input:checked + ul {
  display: block;
}

/* 移动端样式 */
@media screen and (max-width: 767px) {
  .nav-top {
    display: none;
  }
  nav {
    height: 50px;
    box-shadow: 2px 2px 3px #666;
    padding-left: 5%;
  }
  nav .logo img {
    height: 90%;
  }
  nav .nav-ver > ul {
    display: none;
  }
  nav .nav-ver .drop-menu > ul li a,
  nav .nav-ver .drop-menu > ul li label {
    font-size: 12rem;
  }
  nav .nav-ver {
    position: absolute;
    right: 0;
    width: 100%;
  }
  nav .nav-ver .drop-menu {
    display: block;
  }
}

/* 平板端样式 */
@media screen and (min-width: 768px) and (max-width: 992px) {
  /* 在此处编写平板端样式 */
  nav .nav-ver > ul li a {
    padding: 0 20px;
  }
}
</style>